package cn.bluemobi.dylan.step.moder.http.api;


import java.util.List;

import cn.bluemobi.dylan.step.moder.bean.Goods;
import cn.bluemobi.dylan.step.moder.bean.Order;
import cn.bluemobi.dylan.step.moder.bean.User;
import cn.bluemobi.dylan.step.moder.http.response.HttpResponseBean;
import cn.bluemobi.dylan.step.moder.http.response.PageDataBean;
import io.reactivex.Flowable;
import okhttp3.RequestBody;
import retrofit2.http.Body;
import retrofit2.http.Field;
import retrofit2.http.FormUrlEncoded;
import retrofit2.http.Headers;
import retrofit2.http.POST;

/**
 * Created by $Liudan on 2018/8/8 0008.
 *
 */
public interface GoodsApis {


    /**
     * 商品
     *
     * @param
     * @return
     * goodsStatus 1.上架商品2.下架商品，不传所有
     */
    @FormUrlEncoded
    @POST("getGoodsList.json/")
    Flowable<HttpResponseBean<PageDataBean<List<Goods>>>> getGoodsList(@Field("currPage") int currPage, @Field("pageSize") int pageSize, @Field("goodsStatus") int goodsStatus);

    /**
     * 商品兑换
     *
     * @param
     * @return
     * goodsStatus
     *
     */
    @FormUrlEncoded
    @POST("buyGoods.json/")
    Flowable<HttpResponseBean<Goods>> buyGoods(@Field("memberId") int currPage, @Field("goodsId") int pageSize);

    /**
     * 订单
     *
     * @param
     * @return
     * goodsStatus
     */
    @FormUrlEncoded
    @POST("getGoodsOrderList.json/")
    Flowable<HttpResponseBean<PageDataBean<List<Order>>>> getGoodsOrderList(@Field("currPage") int currPage, @Field("pageSize") int pageSize, @Field("memberId") int memberId);



}
